package ControllingExecution;

import java.util.Random;

public class Exercise {
	public static Random r=new Random();
	public static void print1to100(){
		for(int i=1;i<=100;i++)
			System.out.println("i:"+i);
	}
	public static void compareint(){
		int a=r.nextInt();
		int b=r.nextInt();
		System.out.println("a:"+a+" b:"+b);
		if(a>b)
			System.out.println("a>b");
		else if(a<b)
			System.out.println("a<b");
		else
			System.out.println("a=b");
	}
	public static void compareint100(){
		int a=r.nextInt(100);
		int b=r.nextInt(100);
		System.out.println("a:"+a+" b:"+b);
		if(a>b)
			System.out.println("a>b");
		else if(a<b)
			System.out.println("a<b");
		else
			System.out.println("a=b");
	}
	public static void creatcompare(){
		for (int i = 0; i < 25; i++) {
//			compareint();
			compareint100();
		}
	}
	public static void whilecompare(){
		while(1==1)
			compareint100();
	}
	public static void primenumber(){
		for (int i = 1; i <=100; i++) {
			boolean prime=true;
			for (int j = 2; j < i; j++) 
				if(i%j==0)prime=false;
			if(prime)
				System.out.println(i);
		}
	}
	public static void main(String[] args) {
//		print1to100();
//		creatcompare();
//		whilecompare();
		primenumber();
	}
}
